package com.atguigu.gulimall.product.vo;

import com.atguigu.gulimall.product.entity.SkuImagesEntity;
import com.atguigu.gulimall.product.entity.SkuInfoEntity;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;
import lombok.ToString;

import java.util.List;

// 商品展示数据封装
@Data
public class SkuItemVo {

    // spu基本信息
    private SkuInfoEntity info;

    // 是否有货
    private boolean hasStock = true;

    // sku图片
    private List<SkuImagesEntity> images;

    // spu介绍
    private SpuInfoDescEntity desc;

    // spu销售属性
    private List<SkuItemSaleAttrVo> saleAttr;

    // spu规格参数
    private List<SpuItemAttrGroupVo> groupAttrs;

    // sku销售属性封装
    @Data
    @ToString
    public static class SkuItemSaleAttrVo{
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }

    // 保存秒杀信息
    private SecKillInfoVo secKillInfoVo;

    private Long startTimeString;

    private Long endTimeString;

}
